package com.freewater.cargotracker.infrastructure.persistence.mybatis.mapper;

import com.freewater.cargotracker.infrastructure.persistence.mybatis.dbobject.CarrierMovementPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface CarrierMovementMapper {

    int insertAll(List<CarrierMovementPO> carrierMovementPOs);

    int updateByIdSelective(@Param("carrierMovementPO") CarrierMovementPO carrierMovementPO,
                            @Param("changedFields") Set<String> changedFields);

    List<CarrierMovementPO> findByVoyageId(Long voyageId);

    int deleteByIds(Set<Long> ids);

    int deleteAll();
}
